﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "IDbObject.h"
#include "Color.h"

namespace gcmp
{
    /// \brief  CAD图层信息接口类
    class GCMP_MODEL_INTERFACE_EXPORT IDwgLayerInformation : public IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::IDwgLayerInformation, gcmp::IDbObject);

    public:
        /// \brief 创建填充设置对象
        /// 
        /// 创建的填充设置对象默认填充程度是50，填充类型是无
        /// \return 填充设置对象
        static OwnerPtr<IDwgLayerInformation> Create();

        /// \brief 设置图层是否可见
        /// \param visible 图层是否可见
        /// \return 返回true表示设置成功，否则设置失败
        virtual bool SetIsVisible(bool visible) = 0;

        /// \brief 查看图层是否可见
        /// \return 返回true表示已关闭，返回false表示未关闭
        virtual bool IsVisible() const = 0;

        /// \brief 设置图层名字
        /// \param name 图层名字
        /// \return 返回true表示设置成功，否则设置失败
        virtual bool SetLayerName(const std::wstring& name) = 0;

        /// \brief 获取图层名字
        /// \return 返回图层名字
        virtual std::wstring LayerName() const = 0;

        /// \brief 设置线型
        /// \param lineTypeName 线型名
        /// \return 返回true表示设置成功，否则设置失败
        virtual bool SetLineTypeName(const std::wstring& lineTypeName) = 0;

        /// \brief 获取线型
        /// \return 返回线型名
        virtual std::wstring LineTypeName() const = 0;

        /// \brief 设置颜色RGB
        /// \param color 颜色
        /// \return 返回true表示设置成功，否则设置失败
        virtual bool SetAcadColor(const Color& color) = 0;

        /// \brief 获取颜色
        /// \return 返回颜色color的RGB值
        virtual Color AcadColor() const = 0;

        /// \brief 设置线宽
        /// \param lineWidth 线宽
        /// \return 返回true表示设置成功，否则设置失败
        virtual bool SetAcadLineWidth(double lineWidth) = 0;

        /// \brief 获取线宽
        /// \return 返回线宽的枚举值
        virtual double AcadLineWidth() const = 0;

        /// \brief 拷贝图层信息
        /// \return 返回拷贝的图层设置
        virtual OwnerPtr<IDwgLayerInformation> Clone() const = 0;
    };
}
